# 倒包
# 封装测试套件
# 指定测试报告的路径
# 打开文件流
# 创建HTMLTestRunner
import time
import unittest
from scripts.test01 import *
from tools.HTMLTestRunner import *
from scripts.test03_employee import TestEmployee


suite = unittest.TestSuite()
#登录接口测试用例
suite.addTest(unittest.makeSuite(TestLogin))
#员工管理场景测试用例
suite.addTest(TestLogin("test01_case001"))
suite.addTest(unittest.makeSuite(TestEmployee))


report = "./report/report{}.html".format(time.strftime("%Y,%m,%d,%H,%M,%S"))

with open(report,"wb") as f:
    runner = HTMLTestRunner(f, title= "api_case")
    runner.run(suite)

